<template>
	<view class="myOrder">
		<!-- 我的订单所有数据页面 -->
		<view class="titlesHead">
			<view class="iconfont icon-fangxiang-xiangzuo icon" @tap="yun"></view>
			<view class="titname">
				乐 居
			</view>
			<view class="titRight"></view>
		</view>
		<view class="zhanwei">静安阿达</view>
		<!--  -->
		<view class="bsBody">
			<view class="bsName" v-for="item in dingList" :key="item.id" @click="dingdan(item.id)">
				
				<view class="bswen">
					
				{{item.name}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 初始的元素被渲染
				reds:1,
				// 订单样式数据
				dingList: [{
						id: 1,
						name: '待付款'
					},
					{
						id: 2,
						name: '已付款'
					},
					{
						id: 3,
						name: '待收货'
					},
					{
						id: 4,
						name: '已完成'
					},
					{
						id: 5,
						name: '售 后'
					},
				],
			};
		},
		methods: {
			// 点击箭头返回上一页
			yun() {
				uni.navigateBack({
					delta: 1,
				});
			},
			dingdan(id){
				console.log(id)
			}
		},
		onLoad(option) {
			console.log(option)
			this.reds = option.id
			console.log(this.reds)
			
		}
	}
</script>

<style lang="less" scoped>
	.myOrder {
		background-color: #f4e8ab;
		height: 100vh;
		position: relative;

		// 头部固定位置
		.titlesHead {
			height: 100rpx;
			width: 100%;
			position: fixed;
			top: 0;
			left: 0;
			color: white;
			display: flex;
			align-items: center;
			background-color: #135a05;

			.icon {
				flex: 1;
				padding-left: 50rpx;
				box-sizing: border-box;
			}

			.titname {
				flex: 3;
				text-align: center;
			}

			.titRight {
				flex: 1;
			}
		}

		// 头部固定后面占位置的盒子，不要删除哈
		.zhanwei {
			width: 100%;
			height: 100rpx;
			background-color: #104d04;
		}
		.bsBody {
			width: 100%;
			padding: 0 56rpx;
			box-sizing: border-box;
			background-color: #135a05;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.bsName{
				width: 90rpx;
				height: 100rpx;
				text-align: center;
				line-height: 100rpx;
				.bswen{
					font-size: 30rpx;
					font-weight: 700;
				}
				.red{
					color: red;
				}
			}
		}
	}
</style>
